Serial buses such as RS-232 have been widely used in systems such as the personal computer (PC). Standardized serial buses such as Peripheral Component Interconnect Express (PCIE) allow for interoperability of a wide variety of peripherals that can be inserted into bus expansion slots in a PC.
Serial buses that use differential data lines can have high data rates, as small voltage differences between the two data lines can be detected by receivers. Noise immunity is increased since noise that is coupled into both data lines does not affect the differential signal.
FIG. 1 shows a differential serial bus. Transmitter 15 receives a stream of data and drives a voltage difference onto wires TX+, TX− in host-transmit pair 18 to represent the data. Receiver 28 compares the voltage on TX+ to the voltage on TX− and generates an output signal to represent the data. The transmitter's output TX+ is the same line or wire as input RX+ for receiver 28, and output TX− is connected to input RX−. A cable containing host-transmit pair 18 may also have power and ground wires and one or more other pairs.
FIG. 2 shows a protocol-layer diagram of a system with a serial bus. Serial bus 20 has two differential pairs. Host-transmit pair 18 contains two data wires (TX+, TX−) that connect from the transmit Tx outputs of host physical layer 16 to the receive Rx inputs of peripheral physical layer 26. The host sends data to the peripheral over serial bus 20 using host-transmit pair 18. Host physical layer 16 generates differential signals on the two data wires of host-transmit pair 18 while peripheral physical layer 26 has a differential receiver. Host data is arranged in packets by host transport layer 12 and a link to the peripheral established by data link layer 14. Physical layers 16, 26 perform framing, indicating the beginning and end of a frame or packet. Data link layers 14, 24 add and check sequence numbers and checksums to ensure that a packet is received properly and without error.
For reply data from the peripheral to the host, host-receive pair 19 is used. Peripheral data is transmitted as differential data by peripheral physical layer 26 and received by a differential receiver in host physical layer 16.
PCIE is a point-to-point bus protocol, so each serial bus can have only two endpoints. Since each serial bus can carry only a limited bandwidth of data, PCIE allows for multiple serial buses to be placed in parallel between a host and a peripheral. Each serial bus between the host and a peripheral is known as a lane. A higher-bandwidth peripheral can be allocated more lanes than a slower peripheral.
FIG. 3 shows a host connecting to a peripheral over 8 lanes. Host 10 has 8 bi-directional serial buses, or lanes available. Lanes 20A–20H connect to peripheral 30, allowing the bandwidth to be increased by a factor of 8 relative to a single serial bus. Lanes 20A–20H can each be a serial bus with two differential pairs that follow the PCIE specification. Peripheral 30 can be a removable card or device plugged into an expansion slot or connector, or could be fixed in place.
FIG. 4 shows a peripheral that uses only half its available lanes. Peripheral 30′ is plugged into slot 1, which has connections for 8 lanes from host 10. However, peripheral 30′ only supports 4 lanes, since it has only 4 serial-bus connections. The first four lanes 20A–20D from host 10 connect to peripheral 30′ in slot 1, but the other 4 lanes 20E–20H from host 10 to slot 1 are not used, since peripheral 30′ only has 4 serial-bus transceivers. During initialization, negotiation occurs between host 10 and peripheral 30′ to determine the maximum number of lanes between the two device endpoints, which is the smaller number of lanes supported by either host 10 or peripheral 30′.
In a traditional parallel bus, signals could connect to other slots and be used by other peripherals. However, the timing requirements of high-speed serial buses such as PCIE require that each bus have only 2 endpoints. Thus each serial bus lane can connect from the host to only one slot. When the peripheral inserted into the slot does not use all serial-bus lanes, then the remaining unused lanes cannot be used by other peripherals in other slots. Thus the four lanes 20E–20H are wasted.
Although serial-bus lanes can have only two endpoints, one of the endpoints could be a bus switch. The bus switch can receive signals from the serial bus lane and re-transmit the signals over a second serial-bus segment. Such bus switches could allow lanes from a host to connect to different slots, based on the needs of the peripherals in those slots.
A software-based bus switch that connects serial buses together may be constructed by using switching software at or above the transport layer (See FIG. 2). The switching software can forward data from one physical layer to another physical layer. However, transport-layer switches can be slow since data must be passed up through the physical, data-link, and transport layers, and then back down from the transport layer to the data-line and physical layers.
A physical-layer bus switch may provide for faster data transmission with a reduced switch latency.
While such a bus switch is useful, some possible combinations of peripherals can have less than optimal lane allocations. For example, when one peripheral is a 16-lane peripheral, no lanes might remain for another peripheral in slot 2. When the second peripheral is a slow peripheral, it might be desirable to allocate just one lane to this peripheral, with the remaining lanes allocated to the first peripheral. However, the first peripheral may not be able so support an odd number of lanes, since the number of lanes for a peripheral are defined to be 1, 2, 4, 8, 12, 16, or 32. Thus the first peripheral could not support 15 lanes, and would have to drop back to using only 12 lanes, with the remaining 3 lanes being unused.